
class Student
{
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("2个参数");
    }
    {

        name="caocao";
        System.out.println("没有参数");
    }
    public Student() {

    }
}
public class Test4 {
    public static void main(String[] args) {
        //Student student=new Student("zjm",20);
        Student student=new Student();
        System.out.println(student.getName());
    }
}
